/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

/**
 *
 * @author Gr-Developer
 */
public class ChangeLanguageController extends AbstractController {

    public ChangeLanguageController() {
    }

    @Override
    protected ModelAndView handleRequestInternal(
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        HttpSession session = request.getSession();
        String LangsParam = request.getParameter("lang");
        session.setAttribute("OLDLANGS", session.getAttribute("LANGS"));
        session.setAttribute("LANGS", LangsParam);
        return null;
    }

}